The present invention relates to N-methylol derivatives of polycondensation products obtained from basic ureas, polyamines and bifunctional alkylating agents, to a process for their preparation and to their use for improving the wet fastness properties of dyeings and prints obtained with reactive and direct dyestuffs on cellulose and cellulose blend fabrics.